Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header support #47

Merged
merged 6 commits into from
Jul 6, 2020
Merged

Header support #47

merged 6 commits into from
Jul 6, 2020

Conversation

sandeep-paliwal
Copy link
Contributor

@sandeep-paliwal sandeep-paliwal commented Jun 29, 2020

Fixes #45
Add support to pass headers to SDK methods

Description

All target SDK methods will support optional argument, to pass any headers to the actual API call. This will help to override the default accept and Content-Type headers as assign them user specified values.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x ] I have signed the Adobe Open Source CLA.
  • [x ] My code follows the code style of this project.
  • [ x] My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.
  • [x ] I have added tests to cover my changes.
  • [x ] All new and existing tests passed.

…m for all SDK calls.

This will help to provide accept and Content-Type header values based on the data being fetched.
@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@4effd00). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             master       #47   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?         3           
  Lines             ?       377           
  Branches          ?        41           
==========================================
  Hits              ?       377           
  Misses            ?         0           
  Partials          ?         0           
Impacted Files Coverage Δ
src/index.js 100.00% <100.00%> (ø)
src/SDKErrors.js 100.00% <0.00%> (ø)
test/mock.js 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4effd00...0972933. Read the comment docs.

@meryllblanchet meryllblanchet requested a review from shazron June 29, 2020 12:44
README.md Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
.eslintrc Outdated Show resolved Hide resolved
@shazron shazron merged commit 56d1366 into master Jul 6, 2020
@shazron shazron deleted the header_support branch July 6, 2020 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Target API calls retuning HTTP 500 in Firefly Apps
2 participants